home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / brutil.arc / WHEREIS.DOC < prev   
Text File  |  1988-02-19  |  6KB  |  186 lines

  1. documentation for wHEREIS command
  2.  
  3.  
  4. Purpose:   Searches for specified file(s) through all DOS
  5.            2.0 directories listing matching files with their
  6.            appropriate directories and sub-directories.
  7.  
  8. Syntax:    WHEREIS [drive:][filename[.ext]][/options]
  9.        WHEREIS [drive:][mm-dd-[cc]yy][.[mm-dd-[cc]yy]]/L|/E|/G[/options]
  10.  
  11. Type:      External
  12.  
  13. Remarks:   This command is from the January 1984 issue of
  14.            "Softalk for the IBM Personal Computer" by John
  15.        Socha. It will work correctly on any drive.
  16.  
  17.  
  18. Options:
  19.  
  20. /nn -- nn=1-255 set for paging every 1-255 lines
  21.        nn=0    set for no paging of output
  22. /A -- finds files with the archive attribute bit set
  23. /D -- finds only directories
  24. /E -- equal -- finds files created on a specified date.
  25. /F -- full -- include drive name with output file names
  26. /G -- greater -- finds files created after a specified date.
  27. /H -- finds files with the hidden attribute bit set
  28. /L -- less -- finds files created before a specified date.
  29. /N -- finds only "normal" files without directory or volume labell bits set
  30. /R -- finds files with the read-only attribute bit set
  31. /S -- finds files with the system attribute bit set
  32. /V -- finds files with the volume attribute bit set
  33. /X -- finds only "exact" files with the exact set of attributes specified
  34.  
  35. If no file name is supplied with all but /E /G and /L, a filename of *.* is
  36. used.  If no date is supplied with /E /G or /L, the current date is used.
  37.  
  38. With /E /G or /L, an alternate syntax is required.  It is shown on the second
  39. line of the format as shown above.
  40.  
  41. Where:
  42. mm -- Month (1-12)
  43. dd -- Day (1-31)
  44. cc -- optional century (19 or 20)
  45. yy -- year (00-99 if cc=20, otherwise, 80-99)
  46.  
  47. Any two of these options may be entered in any order and may also be specified
  48. along with any other options described above.  In this way you can locate files
  49. created on or after a specified date or to locate all files not created on a
  50. specified date.  Note that using all three options together would be the
  51. equivalent of selecting all files.  That would be like using a machine gun to
  52. kill mosquitos.  It works but there is a much less dramatic way to do it.
  53. Just type: WHEREIS
  54.  
  55. If you include a period in the date specification, you may enter a second
  56. date.  With the /E option, files matching this date will be included as well.
  57. With /L or /G, the opposite condition is applied to the second date.
  58. If nothing is entered for the second date, the current date is used.
  59.  
  60. The /nn option stops the program every nn lines and waits for a response from
  61. the keyboard.  Pressing CTRL-C ends the program.
  62. Pressing the letter S or s lets you temporarily leave the program to do some
  63. other operations.  You are prompted to enter a command.  If you do, that
  64. command will be executed and WHEREIS will regain control and proceed to the
  65. next file or group of files to be listed.  If you do not enter a command,
  66. the program will go to COMMAND.COM and you will then be able to enter any
  67. commands you wish.  When you finish, type EXIT and WHEREIS will regain
  68. control and continue.
  69.  
  70. When you are asked to enter a command, WHEREIS makes available the fully
  71. specified path and file name of the last file displayed.  This allows you to
  72. use DOS's standard line editing facilities to include the file name.  The
  73. most common application would be to: Press Insert, type a command followed
  74. by a blank, Press F3 to bring down the filename, then press enter.  Here is an
  75. example.
  76.  
  77.  
  78. WHEREIS WHEREIS/1
  79. \BATCH\WHEREIS.COM
  80. Enter command for shell operation.
  81. *FILES C:\BATCH\WHEREIS.COM/F/P
  82. WHEREIS.COM  1988-02-19 11:59:00      2K      1732 Arc                    
  83. \MASM\SOURCE\WHEREIS.ASM
  84. Enter command for shell operation.
  85. *FILES C:\MASM\SOURCE\WHEREIS.ASM/F/P
  86. WHEREIS.ASM  1988-02-19 11:58:42     18K     18176 Arc                    
  87. \MASM\SOURCE\WHEREIS.DOC
  88. Enter command for shell operation.
  89. *FILES C:\MASM\SOURCE\WHEREIS.DOC/F/P
  90. WHEREIS.DOC  1988-02-17 09:52:30      6K      5120
  91. \TB\WHEREIS.BAS
  92. Enter command for shell operation.
  93. *FILES C:\TB\WHEREIS.BAS/F/P
  94. WHEREIS.BAS  1987-11-04 01:10:00      8K      7594
  95. \TB\WHEREIS.INC
  96. Enter command for shell operation.
  97. *FILES C:\TB\WHEREIS.INC/F/P
  98. WHEREIS.INC  1987-11-04 01:10:00     22K     21761
  99.  
  100. In the above example, I added another wrinkle! I typed /F/P after pressing
  101. F3.
  102.  
  103.  
  104.  
  105. This release includes other fairly minor changes from the previous version.
  106. If no extension is included in the command line filespec,WHEREIS now acts the
  107. same as the DOS DIR command, that is:
  108.  
  109.             WHEREIS file {CR}
  110.  
  111. performs the same search as:
  112.  
  113.             WHEREIS file.* {CR}
  114.  
  115. WHEREIS can still look for files with only null extensions by using:
  116.  
  117.             WHEREIS file. {CR}
  118.  
  119. If you do not enter anything before the period, an asterisk is inserted.
  120. In other words:
  121.  
  122.             WHEREIS . {CR}
  123.  
  124. is equivalent to:
  125.  
  126.             WHEREIS *. {CR}
  127.  
  128.  
  129. NOTE:  This is an equivalent of the Norton Utilities "File Find",
  130. except that Norton prints full directory information, and this just
  131. prints the path.
  132.  
  133. WHEREIS has the capability of setting the DOS ERRORLEVEL flag to 1 or 0.
  134. 1 means that no matching filenames were found.
  135.  
  136. Examples:
  137.  
  138.        The following examples demonstrate
  139.            proper usage (where {CR} indicates a carriage
  140.            return: 
  141.  
  142.  
  143.                     WHEREIS myfile.txt {CR}
  144.  
  145.                     WHEREIS myfile.* {CR}
  146.  
  147.             WHEREIS myfile {CR}
  148.  
  149.             WHEREIS myfile. {CR}
  150.  
  151.                     WHEREIS *.bas {CR}
  152.  
  153.             WHEREIS .bas {CR}
  154.  
  155.                     WHEREIS *.* {CR}
  156.  
  157.             WHEREIS * {CR}
  158.  
  159.             WHEREIS {CR}
  160.  
  161.             WHEREIS *. {CR}
  162.  
  163.             WHEREIS . {CR}
  164.  
  165.             WHEREIS A:* {CR}
  166.  
  167.             WHEREIS A: {CR}
  168.  
  169.             WHEREIS 8-24-87/E {CR}
  170.  
  171.             WHEREIS 8-24-87/G {CR}
  172.  
  173.             WHEREIS 8-25-87./E/G {CR}
  174.  
  175.             WHEREIS 8-1-87/E/G/D {CR}
  176.  
  177.             WHEREIS 8-1-87./E/G/D {CR}
  178.  
  179.             WHEREIS 8-24-87/L/H {CR}
  180.  
  181. In my opinion, not enough can be said about the virtues of including the
  182. source code with your executable programs.  Without it, I would have had to
  183. re-invent the wheel in order to get the results I have obtained by adding
  184. code to this program to support the new features described here.  WHEREIS.ASM
  185. contains the source code for this program.  Enjoy!
  186.  to this program to support the new features described here.